package edu.sut;
//剧院座位
/*public class C {
    public static void main(String[] args) {
        int i,j;
        for(i=0;i<8;i++)
        {
            acb: for(j=1;j<=8;j++)
            {
                if(j==1 || j==8)
                    continue acb;
                System.out.print(j);
            }
            System.out.println();
        }
    }
}*/

//书柜放书
/*public class C {
    public static void main(String[] args) {

        String [][] a=new String[4][3];
        a[0][0] = new String("历史") ;
        a[0][2]=new String("地理");
        a[1][1]="科学";
        a[2][2]="军事";
        a[3][1]="新闻杂志";
        for(int i=0;i<4;i++)
        {
            for(int j=0;j<3;j++)
            {

                System.out.print(a[i][j] );
            }
            System.out.println();
        }

    }
}*/

//遍历数组  算对角线和
/*public class C {
    public static void main(String[] args) {
        int [][]a = {{22,66,59},{45,99,80},{88,64,48} };
        int sum=0;
        for(int i=0;i<a.length;i++)
        {
            for(int j=0;j<a[i].length;j++)
            {
                System.out.print(a[i][j]+" ");
                if(i==j||i+j==2)
                {
                    sum+=a[i][j];
                }
            }
            System.out.println();
        }
        sum+=a[1][1];
        System.out.println("sum = "+sum);
    }
}*/

//交换二维数组行列数据
/*public class C {
    public static void main(String[] args) {
        int [][]a = {{22,66,59},{45,99,80},{88,64,48}};
        int [][]b = new int[3][3];
        for(int i=0;i<a.length;i++)
        {
            for(int j=0;j<a[i].length;j++)
            {
                b[i][j]=a[j][i];

                System.out.print(b[i][j]+" ");
            }
            System.out.println();
        }
    }
}*/

//方法交换参数
/*import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
       // C.s(12,65);
        int x=scanner.nextInt();
        int y=scanner.nextInt();
        C.s(x,y);
    }
    public static int s(int a,int b)
    {
        int c;
        c=a;
        a=b;
        b=c;
        System.out.println(a);
        System.out.println(b);
        return c;
    }
}*/

//方法  计算平均成绩
/*import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        System.out.println("n="+n);
        Scanner scanner1=new Scanner(System.in);
        double []a = new double[n];
        double sum=0.0,max=0.0,min=100.0;
        double ave;
        for(int i=0;i<n;i++)
        {
             a[i]=scanner1.nextDouble();
            System.out.println("a["+i+"]="+a[i]);
            if(a[i]>max){
                max=a[i];
            }
            if(a[i]<min){
                min=a[i];
            }
            sum+=a[i];
        }
        sum=sum-max-min;
        ave=1.0*sum/(n-2);
        System.out.println("ave="+ave);
    }
}*/

//录入成绩，统计人数
/*import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n=scanner.nextInt();
        int []a = new int[n];
        int b=0,c=0;

        Scanner scanner1 = new Scanner(System.in);

        for(int i=0;i<n;i++){
             a[i] = scanner1.nextInt();
             if(a[i]>100||a[i]<0){
                 System.out.println("错误，请重新输入！");
                 i--;
                 continue;
             }
                 if(a[i]>=0&&a[i]<=100){
                     if(a[i]>=60){
                         b++;
                     }
                     else{
                         c++;
                     }
             }
        }
        System.out.println("及格人数b="+b+"不及格人数c="+c);
    }
}*/

//设计两个方法，返回数组元素的最大值和最小值
/*import java.util.Scanner;

public class C {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n=scanner.nextInt();
        int []a=new int[n];
        Scanner scanner1 = new Scanner(System.in);
        for(int i=0;i<n;i++){
            a[i] = scanner1.nextInt();
        }
        System.out.println(getmax(a));
        System.out.println(getmin(a));
    }
    public static int getmax(int a[]){
        int max=0;
        for(int i=0;i<a.length;i++){
            if(max<a[i]){
                max=a[i];
            }
        }
        return max;
    }
    public static int getmin(int a[]){
        int min=a[0];
        for(int i=0;i<a.length;i++){
            if(min>a[i]){
                min=a[i];
            }
        }
        return min;
    }
}*/

//数组正序排序
/*import java.util.Scanner;

public class C  {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int []a=new int[n];

        Scanner scanner1 = new Scanner(System.in);
        for(int i=0;i<n;i++){
            a[i]=scanner.nextInt();
        }
        ps(a);
    }
    public static void ps(int a[]){
        int t;

        for(int i=0;i<a.length;i++)
        {
            for(int j=i+1;j<a.length;j++)
            {
                if(a[i]>a[j])
                {
                    t=a[i];
                    a[i]=a[j];
                    a[j]=t;
                }
            }
            System.out.print(a[i]+" ");
        }

    }
}*/
